﻿

namespace Ku.Modules.Demo
{
    public class DemoModule : IModule
    {
        private readonly IRegionManager _regionManager;
        public DemoModule(IRegionManager regionManager)
        {
            _regionManager = regionManager;
        }
        /// <summary>
        /// 01  注册模块实现的任何服务或功能 ：用于在您的应用程序将使用的容器中注册类型。
        /// </summary>
        /// <param name="containerRegistry"></param>
        public void RegisterTypes(IContainerRegistry containerRegistry)
        {
            //注册控件
            containerRegistry.RegisterForNavigation<A>("Ku_Modules_Demo_A");
            containerRegistry.RegisterForNavigation<B>("Ku_Modules_Demo_B");
            containerRegistry.RegisterForNavigation<C>("Ku_Modules_Demo_C");
            containerRegistry.RegisterForNavigation<MainTabItem>("MainTabItem");
            containerRegistry.RegisterForNavigation<MainTabItemB>("MainTabItemB");

            //_regionManager.RegisterViewWithRegion<MainTabItem>(RegionNames.MainTabRegion, typeof(MainTabRegion));
        }
        /// <summary>
        /// 02 模块已被初始化
        /// 在这里应该执行诸如视图注册或任何其他模块初始化代码之类的操作  
        /// </summary>
        /// <param name="containerProvider"></param>
        public void OnInitialized(IContainerProvider containerProvider)
        {

        }

    }
}